Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template mappings are not loading in 0.90.8 #4511

Closed
seallison opened this issue Dec 18, 2013 · 6 comments · Fixed by #4530
Closed

template mappings are not loading in 0.90.8 #4511

seallison opened this issue Dec 18, 2013 · 6 comments · Fixed by #4530

Comments

@seallison
Copy link

I have templates that define specific mappings. In testing 0.90.8 today, I noticed that the template mappings are not being used when I load data in to an index that matches the template. This has worked in all previous versions of ElasticSearch that I have used (0.19x -> 0.90.7).

@s1monw
Copy link
Contributor

s1monw commented Dec 18, 2013

Hey @seallison can you gimme more information what you mean by template mapping and maybe provide a small recreation gist for the problem you see?

@ghost ghost assigned spinscale Dec 18, 2013
@spinscale
Copy link
Contributor

Hey,

there were a couple of bugs fixed for 0.90.8 regarding file based mapping template loading - actually template loading by file was not working until 0.90.8 in a couple of previous 0.90 releases (wondering that this has worked for you so far). I am very happy to help and debug the issue with you, if you help with a bit more information.

@seallison
Copy link
Author

This is an example of what I'm talking about: https://gist.github.com/seallison/8031640

Let me know if you need any additional information. Thanks!

@seallison
Copy link
Author

@spinscale all of my mappings have been in templates that I construct like in my gist. I've deployed this using 0.90.0, 0.90.3, and 0.90.5 without issue.

@spinscale
Copy link
Contributor

I can see why it happens. A quick fix is to remove the most outer data structure named template_testlocations and directly start with template like this:

{
        "template": "locations*",
        "mappings": {
            "locations": {
                "_source": {
                    "compress": true
                },
                "_all": {
                    "enabled": false
                },
                "properties": {
                    "contactPersonId" : {
                        "index_analyzer": "keyword",
                        "type" : "string"
                    },
                    "state": {
                        "index_analyzer": "keyword",
                        "type": "string"
                    }
                }
            }
        }
    }

spinscale added a commit to spinscale/elasticsearch that referenced this issue Dec 20, 2013
The fixes introduced in elastic#4235 and elastic#4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes elastic#4511
@s1monw
Copy link
Contributor

s1monw commented Dec 22, 2013

We gonna revert the revert to make sure people that were on 0.90.8 and move to the next version will have a better user experience if we support both formats hence I reopened #4517

@s1monw s1monw reopened this Dec 22, 2013
spinscale added a commit that referenced this issue Dec 22, 2013
The fixes introduced in #4235 and #4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes #4511
brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
The fixes introduced in elastic#4235 and elastic#4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes elastic#4511
javanna added a commit that referenced this issue Feb 19, 2014
- Renamed IndexMetaData#removerAlias to removeAlias
- Removed IndexTemplateMetaData#fromXContentStandalone unused method (relates to #4511)
- MetaDataIndexAliasesService fix typo in comment
- Alias removed unused constructor that accepts both alias name and filter
javanna added a commit that referenced this issue Feb 19, 2014
- Renamed IndexMetaData#removerAlias to removeAlias
- Removed IndexTemplateMetaData#fromXContentStandalone unused method (relates to #4511)
- MetaDataIndexAliasesService fix typo in comment
- Alias removed unused constructor that accepts both alias name and filter
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
The fixes introduced in elastic#4235 and elastic#4411 do not take into account, that a
template JSON in the config/ directory includes a template name, as opposed
when calling the Put Template API.

This PR allows to put both formats (either specifying a template name or not)
into files. However you template name/id may not be one of the template
element names like "template", "settings", "order" or "mapping".

Closes elastic#4511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants